home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 11
/
Cream of the Crop 11-1.iso
/
compress
/
gnucpio.zip
/
PATCHES.OS2
< prev
next >
Wrap
Text File
|
1996-01-01
|
8KB
|
251 lines
diff -cb orig/copyin.c new/copyin.c
*** orig/copyin.c Wed Nov 30 23:49:06 1994
--- new/copyin.c Mon Jan 01 10:05:36 1996
***************
*** 1055,1063 ****
printf ("%s %3u ", mbuf, file_hdr->c_nlink);
- #ifndef __MSDOS__
if (numeric_uid)
- #endif
printf ("%-8u %-8u ", (unsigned int) file_hdr->c_uid,
(unsigned int) file_hdr->c_gid);
#ifndef __MSDOS__
--- 1055,1061 ----
diff -cb orig/copyout.c new/copyout.c
*** orig/copyout.c Wed Nov 30 23:47:40 1994
--- new/copyout.c Mon Jan 01 10:05:38 1996
***************
*** 108,115 ****
--- 108,117 ----
int dev = 0, rdev = 0;
#endif
+ #ifndef __EMX__
if ((file_hdr->c_ino >> 16) != 0)
error (0, 0, "%s: truncating inode number", file_hdr->c_name);
+ #endif
sprintf (ascii_header,
"%06o%06o%06lo%06lo%06lo%06lo%06lo%06o%011lo%06lo%011lo",
***************
*** 135,142 ****
--- 137,146 ----
short_hdr.c_magic = 070707;
short_hdr.c_dev = makedev (file_hdr->c_dev_maj, file_hdr->c_dev_min);
+ #ifndef __EMX__
if ((file_hdr->c_ino >> 16) != 0)
error (0, 0, "%s: truncating inode number", file_hdr->c_name);
+ #endif
short_hdr.c_ino = file_hdr->c_ino & 0xFFFF;
short_hdr.c_mode = file_hdr->c_mode & 0xFFFF;
***************
*** 153,159 ****
--- 157,165 ----
archives, but for devices it sets major = 0, minor = 1, and
puts the actual major/minor number in the filesize field. */
case CP_IFCHR:
+ #ifdef CP_IFBLK
case CP_IFBLK:
+ #endif
#ifdef CP_IFSOCK
case CP_IFSOCK:
#endif
diff -cb orig/main.c new/main.c
*** orig/main.c Thu Dec 01 01:24:20 1994
--- new/main.c Mon Jan 01 10:05:44 1996
***************
*** 81,86 ****
--- 81,90 ----
FILE *fp;
int status;
{
+ #ifdef __MSDOS__
+ extern char *version_string;
+ fprintf(stderr, "\nGNU cpio %s\n", version_string);
+ #endif
fprintf (fp, "\
Usage: %s {-o|--create} [-0acvABLV] [-C bytes] [-H format] [-M message]\n\
[-O [[user@]host:]archive] [-F [[user@]host:]archive]\n\
***************
*** 88,94 ****
[--null] [--reset-access-time] [--verbose] [--dot] [--append]\n\
[--block-size=blocks] [--dereference] [--io-size=bytes] [--quiet]\n\
[--force-local] [--help] [--version] < name-list [> archive]\n", program_name);
! fprintf (fp, "\
%s {-i|--extract} [-bcdfmnrtsuvBSV] [-C bytes] [-E file] [-H format]\n\
[-M message] [-R [user][:.][group]] [-I [[user@]host:]archive]\n\
[-F [[user@]host:]archive] [--file=[[user@]host:]archive]\n\
--- 92,98 ----
[--null] [--reset-access-time] [--verbose] [--dot] [--append]\n\
[--block-size=blocks] [--dereference] [--io-size=bytes] [--quiet]\n\
[--force-local] [--help] [--version] < name-list [> archive]\n", program_name);
! fprintf (fp, "\n\
%s {-i|--extract} [-bcdfmnrtsuvBSV] [-C bytes] [-E file] [-H format]\n\
[-M message] [-R [user][:.][group]] [-I [[user@]host:]archive]\n\
[-F [[user@]host:]archive] [--file=[[user@]host:]archive]\n\
***************
*** 100,106 ****
[--force-local] [--no-absolute-filenames] [--sparse] [--only-verify-crc]\n\
[--quiet] [--help] [--version] [pattern...] [< archive]\n",
program_name);
! fprintf (fp, "\
%s {-p|--pass-through} [-0adlmuvLV] [-R [user][:.][group]]\n\
[--null] [--reset-access-time] [--make-directories] [--link] [--quiet]\n\
[--preserve-modification-time] [--unconditional] [--verbose] [--dot]\n\
--- 104,110 ----
[--force-local] [--no-absolute-filenames] [--sparse] [--only-verify-crc]\n\
[--quiet] [--help] [--version] [pattern...] [< archive]\n",
program_name);
! fprintf (fp, "\n\
%s {-p|--pass-through} [-0adlmuvLV] [-R [user][:.][group]]\n\
[--null] [--reset-access-time] [--make-directories] [--link] [--quiet]\n\
[--preserve-modification-time] [--unconditional] [--verbose] [--dot]\n\
diff -cb orig/makefile.os2 new/makefile.os2
*** orig/makefile.os2 Sat Aug 22 20:00:32 1992
--- new/makefile.os2 Mon Jan 01 10:18:50 1996
***************
*** 15,50 ****
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- # no more optimizations for MS C 6.00 than -Olt
- # otherwise it produces bad code!
-
DEFS = -D__MSDOS__ -DSTDC_HEADERS -DHAVE_VPRINTF -DHAVE_STRERROR -DNO_REMOTE
! # use this for MS C 6.00 (16-bit)
! #CC = cl -nologo -AS -Ot
! #CFLAGS = -Za -I. $(DEFS)
! #LDFLAGS = -Lp -Fb -F 4000 -link /noe
! #LIBS = d:\ms\lib\setargv.obj
! #DEF = cpio.def
! #O = .obj
- # and this for emx/gcc (32-bit)
- CC = gcc -O
CFLAGS = -ansi -I. $(DEFS)
- LDFLAGS = -s
LIBS =
- DEF =
- O = .o
OBJS = copyin$(O) copyout$(O) copypass$(O) dstring$(O) fnmatch$(O) \
global$(O) main$(O) tar$(O) util$(O) error$(O) getopt$(O) getopt1$(O) \
filemode$(O) version$(O) xmalloc$(O) xstrdup$(O) makepath$(O) bcopy$(O) \
! dirname$(O) stripslash$(O) # tcexparg$(O)
all: cpio.exe
! cpio.exe: $(OBJS) $(DEF)
! $(CC) -o $@ $(DEF) $(OBJS) $(LIBS) $(LDFLAGS)
.c$(O):
$(CC) -c $(CFLAGS) $<
--- 15,44 ----
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
DEFS = -D__MSDOS__ -DSTDC_HEADERS -DHAVE_VPRINTF -DHAVE_STRERROR -DNO_REMOTE
! # this is for emx/gcc (32-bit)
! release:
! $(MAKE) all -f makefile.os2 \
! CC="gcc -Zomf -O" O=".obj" LDFLAGS="-s -Zcrtdll -Zstack 512"
! debug:
! $(MAKE) all -f makefile.os2 \
! CC="gcc -g" O=".o" LDFLAGS=""
CFLAGS = -ansi -I. $(DEFS)
LIBS =
OBJS = copyin$(O) copyout$(O) copypass$(O) dstring$(O) fnmatch$(O) \
global$(O) main$(O) tar$(O) util$(O) error$(O) getopt$(O) getopt1$(O) \
filemode$(O) version$(O) xmalloc$(O) xstrdup$(O) makepath$(O) bcopy$(O) \
! dirname$(O) stripslash$(O) defer$(O) # tcexparg$(O)
all: cpio.exe
! cpio.exe: $(OBJS)
! $(CC) -o $@ $(OBJS) $(LIBS) $(LDFLAGS)
!
! .SUFFIXES: .c $O
.c$(O):
$(CC) -c $(CFLAGS) $<
diff -cb orig/makepath.c new/makepath.c
*** orig/makepath.c Wed Nov 30 23:50:10 1994
--- new/makepath.c Mon Jan 01 10:08:22 1996
***************
*** 62,71 ****
#include <strings.h>
#endif
! #if defined(__MSDOS__) && !defined(__GNUC__)
! typedef int uid_t;
! typedef int gid_t;
! #endif
void error ();
--- 62,68 ----
#include <strings.h>
#endif
! #include "system.h" /* for PC's, uid_t, gid_t, mkdir() */
void error ();
diff -cb orig/system.h new/system.h
*** orig/system.h Wed Nov 30 23:50:00 1994
--- new/system.h Mon Jan 01 10:12:34 1996
***************
*** 91,100 ****
#ifndef errno
extern int errno;
#endif
- #ifdef __EMX__ /* gcc on OS/2. */
- #define EPERM EACCES
- #define ENXIO EIO
- #endif
#ifdef HAVE_UTIME_H
#include <utime.h>
--- 91,96 ----
***************
*** 124,129 ****
--- 120,129 ----
#if defined(__MSDOS__) && !defined(__GNUC__)
typedef int uid_t;
typedef int gid_t;
+ #endif
+
+ #if defined(__MSDOS__) && !defined(__EMX__)
+ #define mkdir(p, m) mkdir(p)
#endif
/* On most systems symlink() always creates links with rwxrwxrwx
diff -cb orig/util.c new/util.c
*** orig/util.c Wed Nov 30 23:47:52 1994
--- new/util.c Mon Jan 01 10:14:30 1996
***************
*** 1000,1006 ****
}
#endif /* SYMLINK_USES_UMASK */
! #if defined(__MSDOS__) && !defined(__GNUC__)
int
chown (path, owner, group)
char *path;
--- 1000,1006 ----
}
#endif /* SYMLINK_USES_UMASK */
! #if defined(__MSDOS__) && !defined(__GNUC__) || defined(__EMX__)
int
chown (path, owner, group)
char *path;